<template>
  <div class="over">
    <ul>
      <li v-for="(item,index) in overs"
          :key="index">
        <div class="over_list">
          <div class="overll">
            <span>￥</span>
            <span class="num">{{item.amount}}</span>
            <span>.</span>
            <span>0</span>
            <p>满{{item.sum_condition}}元可用</p>
          </div>
          <div class="overlr">
            <h4>{{item.name}}</h4>
            <p>{{item.end_date}}到期</p>
            <p>限收货手机号为{{item.phone}}</p>
          </div>
          <!-- <div class="overdue">
            <i class="iconfont icon-yiguoqi"></i>
          </div> -->
        </div>
        <div class="overdue">
          <i class="iconfont icon-yiguoqi"></i>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'Over',
  data: function () {
    return {
      overs: [],
    }
  },
  created () {
    this.$axios.get('https://elm.cangdu.org/promotion/v2/users/59869/expired_hongbaos', {
      params: {
        limit: 20,
        offset: 0
      }
    }).then(res => {
      console.log(res);
      this.overs = res.data;
      console.log(this.overs)
    }).catch(err => console.log(err));
  },
}
</script>

<style lang="less">
body {
  background-color: #f5f5f5;
}
.over {
  ul {
    padding: 0 10px 10px 10px;

    li {
      background-color: white;
      border-radius: 5px;
      border-top: 4px solid #ddd;
      margin-bottom: 10px;
      display: flex;
      position: relative;
      .over_list {
        display: flex;
        justify-content: space-between;
        padding: 23px 11px 18px;
        .overll {
          border-right: 0.1px dotted #ccc;
          padding-right: 20px;
          // width: 40%;
          span {
            font-size: 18px;
            color: #ccc;
            font-weight: 700;
          }
          .num {
            font-size: 47px;
          }
          p {
            font-size: 12px;
            color: #999;
          }
        }

        .overlr {
          // width: 30%;
          margin-left: 20px;
          h4 {
            font-size: 14px;
            color: #666;
            font-weight: normal;
          }
          p {
            font-size: 12px;
            color: #999;
          }
        }
      }
      .overdue {
        i {
          font-size: 70px;
          position: absolute;
          top: 15px;
          right: 20px;
          color: #ddd;
          font-weight: normal;
        }
      }
    }
  }
}
</style>